use ClientPlatform

var regExp = /(Forced labour)/;
function updateCriteriaName(collection) {
    collection
        .find({Name: regExp})
        .snapshot()
        .forEach(function (item) {
            print(item.Name);
            item.Name = item.Name.replace(regExp, 'Forced Labour');
            print(item.Name);
            collection.save(item);
        });
}

updateCriteriaName(db.FilterCriteria);
updateCriteriaName(db.TemplateCriteria);
updateCriteriaName(db.OldTemplateCriteria);

